home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Security / Keepass 2.04 / KeePass-2.04-Alpha-Setup.exe / {app} / XSL / KDB4_DetailsFull.xsl next >
Extensible Markup Language  |  2007-02-16  |  3KB  |  97 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  4. <xsl:template match="/">
  5. <xsl:apply-templates select="KeePassFile" />
  6. </xsl:template>
  7.  
  8. <xsl:template match="KeePassFile">
  9. <html>
  10. <head>
  11. <xsl:apply-templates select="Meta" />
  12. <link rel="stylesheet" type="text/css" href="KDB4_Styles.css" />
  13. </head>
  14. <body>
  15. <xsl:apply-templates select="Root" />
  16. </body>
  17. </html>
  18. </xsl:template>
  19.  
  20. <xsl:template match="Meta">
  21. <title><xsl:value-of select="DatabaseName" /></title>
  22. </xsl:template>
  23.  
  24. <xsl:template match="Root">
  25. <xsl:for-each select="Group">
  26. <xsl:apply-templates select="." />
  27. </xsl:for-each>
  28. </xsl:template>
  29.  
  30. <xsl:template match="Group">
  31. <xsl:for-each select="Entry">
  32. <xsl:apply-templates select="." />
  33. </xsl:for-each>
  34. <xsl:for-each select="Group">
  35. <xsl:apply-templates select="." />
  36. </xsl:for-each>
  37. </xsl:template>
  38.  
  39. <xsl:template match="Entry">
  40.  
  41. <table class="tablebox">
  42. <tr><td class="smallboxtitle">
  43. <xsl:for-each select="String[Key='Title']"><xsl:value-of select="Value" /></xsl:for-each>
  44. </td></tr>
  45.  
  46. <tr><td class="boxcontent">
  47.  
  48. <i>Title: </i><xsl:for-each select="String[Key='Title']"><xsl:value-of select="Value" /></xsl:for-each><br />
  49. <i>User Name: </i><xsl:for-each select="String[Key='UserName']"><xsl:value-of select="Value" /></xsl:for-each><br />
  50. <i>Password: </i><xsl:for-each select="String[Key='Password']"><xsl:value-of select="Value" /></xsl:for-each><br />
  51.  
  52. <i>URL: </i>
  53. <xsl:for-each select="String[Key='URL']">
  54. <xsl:element name= "a">
  55. <xsl:attribute name="href">
  56. <xsl:value-of select="Value" />
  57. </xsl:attribute>
  58. <xsl:value-of select="Value" />
  59. </xsl:element>
  60. </xsl:for-each>
  61. <br />
  62.  
  63. <i>Notes: </i><xsl:for-each select="String[Key='Notes']"><xsl:value-of select="Value" /></xsl:for-each><br />
  64.  
  65. <xsl:for-each select="String">
  66.  
  67. <xsl:if test="Key != 'Title'">
  68. <xsl:if test="Key != 'UserName'">
  69. <xsl:if test="Key != 'Password'">
  70. <xsl:if test="Key != 'URL'">
  71. <xsl:if test="Key != 'Notes'">
  72. <i><xsl:value-of select="Key" />: </i>
  73. <xsl:value-of select="Value" /><br />
  74. </xsl:if>
  75. </xsl:if>
  76. </xsl:if>
  77. </xsl:if>
  78. </xsl:if>
  79. </xsl:for-each>
  80.  
  81. <i>Creation Time: </i><xsl:value-of select="Times/CreationTime" /><br />
  82. <i>Last Access Time: </i><xsl:value-of select="Times/LastAccessTime" /><br />
  83. <i>Last Modification Time: </i><xsl:value-of select="Times/LastModificationTime" /><br />
  84.  
  85. <xsl:if test="Times/Expires = 'True'">
  86. <i>Expires: </i><xsl:value-of select="Times/ExpiryTime" />
  87. </xsl:if>
  88. <xsl:if test="Times/Expires != 'True'">
  89. <i>Expires: </i>Never expires
  90. </xsl:if>
  91.  
  92. </td></tr></table><br />
  93.  
  94. </xsl:template>
  95.  
  96. </xsl:stylesheet>
  97.